<template>
	<!-- 商品推荐 -->
  <view class="goods-list">
	<view class="goods-item" v-for="item in goods" :key='item.id'>
		<image :src="item.img_url" mode="widthFix"></image>
	  <view class="price">
		  <text>{{item.market_price}}</text>
		  <text>{{item.sell_price}}</text>
	  </view>
	  <view class="name">
		  {{item.title}}
	  </view>
	</view>
  </view>
</template>

<script>
	export default{
		props:['goods']
	}
</script>

<style lang="scss">
	.goods-list {
		padding: 0 15rpx;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		.goods-item{
			width: 340rpx;
			margin: 10rpx;
			padding: 10rpx;
			box-sizing: border-box;
			background-color: #fff;
			image{
				display: block;
				width: 100%;
				height: 40rpx;
				margin: 0 auto;
			}
			.price{
				color: $shop-color;
				font-size: 36rpx;
				text:nth-child(2){
					color: #ccc;
					text-decoration: line-through;
					font-size: 28rpx;
					margin-left: 20rpx;
				}
			}
			.name{
				color: #000000;
				font-size: 28rpx;
				line-height: 40rpx;
			}
		}
	}
</style>
